﻿@using EasyAbp.Abp.LoginUi
@using EasyAbp.Abp.LoginUi.Web.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using LoginProvidersUi = EasyAbp.Abp.LoginUi.Web.SocialLoginProviders
@model EasyAbp.Abp.LoginUi.Web.Pages.Components.ExternalLoginWidget.ExternalLoginWidgetModel
@inject IHtmlLocalizer<AbpLoginUiResource> L

<form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model!.ReturnUrl" asp-route-returnUrlHash="@Model!.ReturnUrlHash" method="post">
    <div style="text-align: center">
        @foreach (var provider in Model!.VisibleExternalProviders)
        {
            var buttonClasses = LoginProvidersUi.GetButtonClasses(provider.AuthenticationScheme);
            var buttonText = buttonClasses == LoginProvidersUi.DefaultButtonClasses ? L[provider.DisplayName] : null;
            <button type="submit" class="@buttonClasses" style="color: #485585; caret-color: #485585; font-size: 24px; background-color: transparent; border-style: none;" name="provider" value="@provider.AuthenticationScheme" title="@L["LogInUsingYourProviderAccount", provider.DisplayName]">@buttonText</button>
        }
    </div>
</form>